package com.hundsun.cprs.yyt.service.order.dto;

import com.hundsun.cprs.yyt.service.dilivery.domain.DiliveryAddress;
import com.hundsun.cprs.yyt.service.order.enums.EnumDeliveryMethod;

import java.util.Date;

public class DeliveryMethod {
    
    private Integer diliveryType;
    private DiliveryAddress receiver;
    private String selfGetTime;//自提时间
    private String selfGetPhone;//自提人手机号
    private String seleGetName;//自提人姓名

    public Integer getDiliveryType() {
        return diliveryType;
    }
    public void setDiliveryType(Integer diliveryType) {
        this.diliveryType = diliveryType;
    }
    public DiliveryAddress getReceiver() {
        return receiver;
    }
    public void setReciver(DiliveryAddress receiver) {
        this.receiver = receiver;
    }

    public String getSelfGetTime() {
        return selfGetTime;
    }

    public void setSelfGetTime(String selfGetTime) {
        this.selfGetTime = selfGetTime;
    }

    public String getSelfGetPhone() {
        return selfGetPhone;
    }

    public void setSelfGetPhone(String selfGetPhone) {
        this.selfGetPhone = selfGetPhone;
    }

    public String getSeleGetName() {
        return seleGetName;
    }

    public void setSeleGetName(String seleGetName) {
        this.seleGetName = seleGetName;
    }

    /**
     * 是否配送
     * @return
     */
    public boolean isDelivery(){
        return getDiliveryType() == EnumDeliveryMethod.DELIVERY.ordinal();
    }
    
    /**
     * 是否委售
     * @return
     */
    public boolean isEntrust(){
        return getDiliveryType() == EnumDeliveryMethod.ENTRUST.ordinal();
    }

    /**
     * 是否自提
     * @return
     */
    public boolean isSelfGet(){
        return getDiliveryType() == EnumDeliveryMethod.SELFGET.ordinal();
    }
}
